<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Binh
 * Date: 1/3/14
 * Time: 10:36 PM
 * To change this template use File | Settings | File Templates.
 */
?>
<div class="title_head_table">
    <h2>Danh Sách Tác Giả</h2>
    <form action= "<?php echo Uri::create('admin/search_author')?>" method="get">
        <div class="sidebar_search">
            <input type="text" name="search_input_author" class="search_input" value="search keyword" onclick="this.value=''" />
            <input type="image" name="search_submit_author" class="search_submit" src="<?php echo $img."search.png"; ?>"/>
        </div><!--Kết thúc sidebar_search-->
    </form>
</div>

<form action="<?php echo Uri::create('admin/delete_list_author');?>" method="post">
    <table id="rounded-corner" summary="DanhSachTacGia">
        <thead>
        <tr>
            <th scope="col" class="rounded-company"></th>
            <th scope="col" class="rounded">Tên Tác Giả</th>
            <th scope="col" class="rounded">Thông Tin Tác Giả</th>

            <th scope="col" class="rounded-q4">Xóa</th>
        </tr>
        </thead>
        <tbody>
        <?php

        foreach($authors as $author){
            ?>
            <tr>
                <td><input type="checkbox" name="check_author[]" value="<?php echo $author['AUTHOR_ID'];?>"/></td>
                <td><?php echo $author['AUTHOR_NAME']?></td>
                <td><?php echo $author['DESCRIPTION']?></td>

                <td><div align="center"><a href="<?php echo Uri::create('admin/delete_author/').$author['AUTHOR_ID'];?>" ><img src="<?php echo $img."trash.png"; ?>"/></a></div></td>
            </tr>
        <?php
        }
        ?>

        </tbody>
    </table>

    <a href="<?php echo Uri::create('admin/layout_author');?>" class="bt_blue"><img src="<?php echo $img."view_all.png"; ?>"/></a>
    <input type="image" name="delete_list_author"class="bt_red" src="<?php echo $img."delete.png"; ?>" value="delete_list"/>

</form>